package com.gi.profiler.listeners;

import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;

import com.gi.profiler.ProfileListActivity;
import com.gi.profiler.ProfilePreferencesActivity;
import com.gi.profiler.R;
import com.gi.profiler.controllers.ProfileController;
import com.gi.profiler.model.Profile;
import com.gi.profiler.utils.DataConstants;

public class ProfileListListener implements OnItemClickListener {
    private final String LOG_NAME = getClass().getName();

    private ProfileListActivity activity;

    public ProfileListListener(ProfileListActivity activity) {
	this.activity = activity;
    }

    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
	
	activity.startActivity(new Intent(activity, ProfilePreferencesActivity.class).putExtra(
		DataConstants.PROFILE_ID_FOR_VIEW, (Integer) view
		.getTag(R.string.key_profile_id_tag)));
	
	
	// Log.i("GPS", "" + profile.getConnectivitySettings().getGps());
	// Log.i("MediaVolume", profile.getSoundSettings().getMediaVolume() +
	// "");
	// Log.i("Wallpaper", profile.getWallpaper().toString());
    }

}
